package com.ecarx.module_log.bean;

import androidx.annotation.Nullable;

import java.io.File;

public class FileBean {
    private boolean isChecked;
    private File file;

    public FileBean(boolean isChecked, File file) {
        this.isChecked = isChecked;
        this.file = file;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        if (obj instanceof FileBean) {
            FileBean tmp = (FileBean) obj;
            if (this.getFile().getName().equals(tmp.getFile().getName())) {
                return true;
            }
        }
        return false;
    }
}
